import React, {Suspense} from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
// import App from './App(类组件)';
//安装react-router-dom, 直接安装react-router会包含一些react-native的内容，web开发并不需要
//这里可以选中使用 HashRouter 或者 BrowserRouter
import { HashRouter } from 'react-router-dom'

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <HashRouter>
      {/* 如果还没有加载出来，先展示loading */}
      <Suspense fallback={<h3>Loading</h3>}>
        <App />
      </Suspense>
    </HashRouter>
  </React.StrictMode>
);
